<!DOCTYPE html>
<html lang="en">

<head>
    <title>QQ_Blog</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="./css/reset.css">
    <link rel="stylesheet" href="./css/iconfont.css">
    <link rel="stylesheet" href="./css/main.css">
    <script src="./js/vue.2.6.10.js"></script>
</head>

<body>
    <!-- #app -->
    <div id="app">
        <div class="ipt_area">
            <textarea name="" id="text-area" v-model="root_comment"></textarea>
            <button class="button gil-blue" @click="root_submit">发表</button>
        </div>

        <div class="comments_area">
            <root_comment v-for="(item, index) in arr_comments" v-bind:key="item.index" v-bind:receive="item" v-on:send_to_parent="parent_del_comment" v-on:send_goup_to_parent="parent_top"></root_comment>
        </div>

    </div>

    <!-- template -->
    <template id="root_comment">
        <div class="comment">
            <div class="usr_space clearfix">
                <div class="usr_icon fl"><img src="./image/qq.jpg" alt=""></div>
                <div class="usr_data fr">
                    <h3>{{receive.name}}</h3>
                    <div class="p_time">
                        <p>发表时间:{{receive.date}}</p>
                    </div>
                    <div class="p_data">
                        <p>{{receive.comment}}</p>
                    </div>
                </div>
                <div class="usr_top" @click="child_go_top"><i class="iconfont icon-zhiding"></i></div>
            </div>
            <div class="cmt_space">
                <div class="p_box">
                    <p v-for="itm in arr_cld_cmts"> 小明: {{itm}} </p>
                </div>
                <div class="textarea_box" v-show="child_comment_switch">
                    <textarea v-model="cld_cmt"></textarea>
                    <div class="btn_area clearfix">
                        <div class="button btn_sub gil-blue fr" @click="child_sub">提交</div>
                    </div>
                </div>
            </div>
            <div class="btn_space">
                <div class="btn_box" @click="child_del_comment">
                    <i class="iconfont icon-shanchu"></i>
                    <p>删除</p>
                </div><!-- child del -->
                <div class="btn_box" @click="child_cmt">
                    <i class="iconfont icon-pinglun"></i>
                    <p>评论</p>
                </div><!-- child cmt -->
                <div class="btn_box" @click="nice">
                    <i class="iconfont icon-zansel"></i>
                    <p>{{num_nice}}</p>
                </div><!-- child nice -->
            </div>
        </div>
    </template>





    <script src="./js/jquery2.1.0.js"></script>
    <script src="./js/main.js"></script>
</body>

</html>